Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix support for HHVM #106

Merged
merged 3 commits into from
Mar 23, 2014
Merged

Fix support for HHVM #106

merged 3 commits into from
Mar 23, 2014

Conversation

rmccue
Copy link
Collaborator

@rmccue rmccue commented Mar 23, 2014

Fixes #93.

Fixes the fatal error in HHVM (null pointer reference)
See #101. Turns out fsockopen was overriding this, but we have contextual
checking support now, so let's use that.
rmccue added a commit that referenced this pull request Mar 23, 2014
@rmccue rmccue merged commit 4b51a15 into master Mar 23, 2014
@rmccue rmccue deleted the hhvm-fixes branch March 23, 2014 06:52
@rmccue rmccue added Transports and removed Core labels Mar 23, 2014
@rmccue rmccue added this to the 1.7 milestone Mar 23, 2014
@@ -393,6 +393,10 @@ public static function test($capabilities = array()) {
if (isset( $capabilities['ssl'] ) && $capabilities['ssl']) {
if (!extension_loaded('openssl') || !function_exists('openssl_x509_parse'))
return false;

// Currently broken, thanks to https://github.com/facebook/hhvm/issues/2156
if (strpos(PHP_VERSION, 'hiphop') !== false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The supported way to check for hhvm is if(defined('HHVM_VERSION'))

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, thanks. I'll switch to that then.

@@ -274,7 +275,6 @@ protected function setup_handle($url, $headers, $data, $options) {

public function process_response($response, $options) {
if ($options['blocking'] === false) {
curl_close($this->fp);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain the removal here? My group is using non-blocking mode, and the flow here doesn't really look like there should ever have been a double-close. However, this looks like it will keep curl open a bit longer than necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support HHVM
3 participants